# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         test01
# Description:
# Author:       98745
# Date:         2019/3/23
#-------------------------------------------------------------------------------

class Person:
    def __init__(self,age,sex,name):
        self.name=name
        self.age=age
        self.sex=sex

    def eat(self):
        print('person-->eat')
        print('吃东西')


class Student(Person):
    def __init__(self,name,age,sex,college):
        super().__init__(age,sex,name)
        self.college=college

    def eat(self,apple):
        super().eat()
        print('student-->eat')
        print(apple)


class Son(Student):
    def eat(self,apple):
        super().eat(apple)
        print('son-->eat')
        print('play')

if __name__ == '__main__':
    # p=Person(20,'女','pan')
    # print(p)
    # print(p.name)
    # p.eat()
    #
    # print('---------------')
    # s=Student('yyan',20,'男','工大')
    # s.eat('菠萝')
    s=Son('pan',21,'男','工大')
    s.eat('葡萄')